home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2006 May
/
PCWMAY06.iso
/
Software
/
Freeware
/
First Page 2006 3.00
/
fp2006-final-3.00-setup.exe
/
{app}
/
Iscripts
/
Date & Calendars
/
find-fri-13.izs
< prev
next >
Wrap
Text File
|
2005-09-27
|
9KB
|
470 lines
<!NOWIZARD>
<!TITLE>Find Friday the 13th's!
<!/TITLE>
<!DESCRIPTION>This clever script will find all the friday the 13th's within two given dates that you give.<!/DESCRIPTION>
<!CATEGORY>calenders<!/CATEGORY>
<!SCRIPT>
<!-- START OF SCRIPT -->
<!-- HOW TO INSTALL FIND FRIDAY THE 13TH'S!:
1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag
3. Put the last coding into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<!-- Original: Donnie Brewer (brewsky@cox.net ) -->
<!-- Web Site: http://jscript.brewskynet.com/friday -->
<style>
#InternalDiv {position:relative;width:250px;height:1px;color:blue;background-color:#FDF5E6;border-style:double;border-color:blue;padding-top:5px;padding-left:5px;padding-right:5px;padding-bottom:5px;margin:3px;visibility:visible;z-index:10;top:50;left:0;}
</style>
<script>
function startitup() {
var BasicHTML = "<center>Results will be posted here!!</center>"
document.all["InternalDiv"].innerHTML = BasicHTML;
}
</script>
</HEAD>
<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->
<BODY onLoad="startitup()">
<!-- STEP THREE: Copy this code into the BODY of your HTML document -->
<!-- Original: Donnie Brewer (brewsky@cox.net ) -->
<!-- Web Site: http://jscript.brewskynet.com/friday -->
<script>
var new_Date=new Date()
//var DOW=new_Date.getDay()+1
var DOM=new_Date.getDate()
//var Month=new_Date.getMonth()+1
var Year=new_Date.getFullYear()
var LongMonth = new Array("January","February","March","April","May","June","July","August","September","October","November","December")
var LongDay = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var setTimer = 5000;
function find13th() {
var Start = startyear.value
var End = endyear.value
var TooMuch = End-Start
//alert(TooMuch)
if (confirm("Caution, this may result in an extremely large result, and may take a long time to display those results."))
if (End < Start) //if end<start alert user, else
alert("Sorry, the ending year must be greater than or equal to the beginning year..")
else { //allow dates and continue
var BasicHTML = "<center><u>Results!!</u>"
for (YearTest=Start;YearTest<=End;YearTest++) {
if (MonthSelect.value==20) {
for (MonthTest=0;MonthTest<=11;MonthTest++) {
var TestDate = new Date(YearTest,MonthTest,13)
if (TestDate.getDay()==5)
BasicHTML = BasicHTML+"<br>"+LongMonth[MonthTest]+" "+TestDate.getDate()+", "+YearTest
}
}
else {
var TestDate = new Date(YearTest,MonthSelect.value,13)
if (TestDate.getDay()==5)
BasicHTML = BasicHTML+"<br>"+LongMonth[MonthSelect.value]+" "+TestDate.getDate()+", "+YearTest
}
}
document.all["InternalDiv"].innerHTML = BasicHTML;
}
else {
alert("Please make the years closer together..")
}
}
function clearResults() {
var BasicHTML = "<center>Results will be posted here!!</center>"
document.all["InternalDiv"].innerHTML = BasicHTML;
}
</script>
<h1 style="font-size='24'">Find Friday the 13th's!!</h1>
Enter beginning year:
<input type="Text" size="5" maxlength="4" name="startyear" value="2002">
<br><br>
Enter ending year:
<input type="Text" size="5" maxlength="4" name="endyear" value="2002">
<br><br>
You may also select by a particular month:
<select NAME="MonthSelect" size="1" style="HEIGHT: 22px; WIDTH: 130px">
<option VALUE ="20" SELECTED>None Preferred</option>
<option value="0">January</option>
<option value="1">February</option>
<option value="2">March</option>
<option value="3">April</option>
<option value="4">May</option>
<option value="5">June</option>
<option value="6">July</option>
<option value="7">August</option>
<option value="8">September</option>
<option value="9">October</option>
<option value="10">November</option>
<option value="11">December</option>
</select>
<br><br>
<input type="Button" value="Find" onmouseup="find13th()">
<input type="Button" value="Clear Result List" onmouseup="clearResults()">
<layer id="Layer1"><div id="InternalDiv"></div></layer><br><br><br><br>
<!-- END OF SCRIPT -->
<!/SCRIPT>
<!PREVIEW>
<!-- START OF SCRIPT -->
<!-- HOW TO INSTALL FIND FRIDAY THE 13TH'S!:
1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag
3. Put the last coding into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<!-- Original: Donnie Brewer (brewsky@cox.net ) -->
<!-- Web Site: http://jscript.brewskynet.com/friday -->
<style>
#InternalDiv {position:relative;width:250px;height:1px;color:blue;background-color:#FDF5E6;border-style:double;border-color:blue;padding-top:5px;padding-left:5px;padding-right:5px;padding-bottom:5px;margin:3px;visibility:visible;z-index:10;top:50;left:0;}
</style>
<script>
function startitup() {
var BasicHTML = "<center>Results will be posted here!!</center>"
document.all["InternalDiv"].innerHTML = BasicHTML;
}
</script>
</HEAD>
<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->
<BODY onLoad="startitup()">
<!-- STEP THREE: Copy this code into the BODY of your HTML document -->
<!-- Original: Donnie Brewer (brewsky@cox.net ) -->
<!-- Web Site: http://jscript.brewskynet.com/friday -->
<script>
var new_Date=new Date()
//var DOW=new_Date.getDay()+1
var DOM=new_Date.getDate()
//var Month=new_Date.getMonth()+1
var Year=new_Date.getFullYear()
var LongMonth = new Array("January","February","March","April","May","June","July","August","September","October","November","December")
var LongDay = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var setTimer = 5000;
function find13th() {
var Start = startyear.value
var End = endyear.value
var TooMuch = End-Start
//alert(TooMuch)
if (confirm("Caution, this may result in an extremely large result, and may take a long time to display those results."))
if (End < Start) //if end<start alert user, else
alert("Sorry, the ending year must be greater than or equal to the beginning year..")
else { //allow dates and continue
var BasicHTML = "<center><u>Results!!</u>"
for (YearTest=Start;YearTest<=End;YearTest++) {
if (MonthSelect.value==20) {
for (MonthTest=0;MonthTest<=11;MonthTest++) {
var TestDate = new Date(YearTest,MonthTest,13)
if (TestDate.getDay()==5)
BasicHTML = BasicHTML+"<br>"+LongMonth[MonthTest]+" "+TestDate.getDate()+", "+YearTest
}
}
else {
var TestDate = new Date(YearTest,MonthSelect.value,13)
if (TestDate.getDay()==5)
BasicHTML = BasicHTML+"<br>"+LongMonth[MonthSelect.value]+" "+TestDate.getDate()+", "+YearTest
}
}
document.all["InternalDiv"].innerHTML = BasicHTML;
}
else {
alert("Please make the years closer together..")
}
}
function clearResults() {
var BasicHTML = "<center>Results will be posted here!!</center>"
document.all["InternalDiv"].innerHTML = BasicHTML;
}
</script>
<h1 style="font-size='24'">Find Friday the 13th's!!</h1>
Enter beginning year:
<input type="Text" size="5" maxlength="4" name="startyear" value="2002">
<br><br>
Enter ending year:
<input type="Text" size="5" maxlength="4" name="endyear" value="2002">
<br><br>
You may also select by a particular month:
<select NAME="MonthSelect" size="1" style="HEIGHT: 22px; WIDTH: 130px">
<option VALUE ="20" SELECTED>None Preferred</option>
<option value="0">January</option>
<option value="1">February</option>
<option value="2">March</option>
<option value="3">April</option>
<option value="4">May</option>
<option value="5">June</option>
<option value="6">July</option>
<option value="7">August</option>
<option value="8">September</option>
<option value="9">October</option>
<option value="10">November</option>
<option value="11">December</option>
</select>
<br><br>
<input type="Button" value="Find" onmouseup="find13th()">
<input type="Button" value="Clear Result List" onmouseup="clearResults()">
<layer id="Layer1"><div id="InternalDiv"></div></layer><br><br><br><br>
<!-- END OF SCRIPT -->
<!/PREVIEW>
<!RELATED>NONE<!/RELATED>